package com.example.hehecat.yuejian1.ui.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.hehecat.yuejian1.R;
import com.example.hehecat.yuejian1.mvp.model.bean.ClubBean;
import com.squareup.picasso.Picasso;

public class MasterListAdapter extends BaseQuickAdapter<ClubBean, BaseViewHolder> {
    private Context context;

    public MasterListAdapter(int layoutResId, Context context) {
        super(layoutResId);
        this.context = context;
    }


    @Override
    protected void convert(BaseViewHolder helper, ClubBean item) {

            helper.setText(R.id.item_name,item.getClubname())
                    .setText(R.id.item_intro,item.getIntro())
                    .setText(R.id.item_date,item.getCreatetime());

            Picasso.with(context).load(item.getClubimg()).into((ImageView) helper.getView(R.id.item_pic));
        }
    }

